package com.ruoyi.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum PayType {
    //支付状态，0-未支付，1-已支付
    WxPay("wxPay","微信支付"),
    AliPay("aliPay","支付宝支付");

    private String value;
    private String name;

    public static PayType valuesOf(String value) {
        //获取所有枚举集合
        PayType[] es = values();
        for (PayType e : es) {
            if (Objects.equals(e.getValue(), value)) {
                return e;
            }
        }
        return null;
    }
}
